<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='资质荣誉',cssPaths='/static/css/baseinfo/cert.css',jsPaths='/static/js/baseinfo/cert.js')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
            <span class="layui-breadcrumb" lay-separator=">">
                <a th:href="@{/}">首页</a>
                  <a href="/organization">系统管理</a>
                <a><cite>资质荣誉</cite></a>
            </span>
    </div>

    <!--主体内容区-->
    <div class="form-content">
        <form class="layui-form" th:action="@{/organization/save}" method="post">
            <blockquote class="layui-elem-quote">《医疗机构执业许可证》点击图片框进行上传（小于5m的图片），机构若存在相关服务则需上传相关的许可证书，否则不需上传</blockquote>

            <div class="layui-row">
                    <div class="layui-col-md1 label">
                        医疗机构<br/>执业许可证
                    </div>
                    <div class="layui-col-md2">
                        <div class="layui-upload">
                            <div class="layui-upload-list">
                                <img th:if="${dataMap['ylzyxk'] eq null}" class="layui-upload-img"
                                     src="/static/imgs/imgup.png" id="img4">
                                <img th:if="${dataMap['ylzyxk'] ne null}" class="layui-upload-img"
                                     th:src="'/storage/images/'+${dataMap['ylzyxk'].path}+'_120x120'" id="img4">
                                <p class="msg-box" th:if="${dataMap['ylzyxk'] eq null}"></p>
                                <p class="msg-box" th:if="${dataMap['ylzyxk'] ne null}">
                                    <a target="_blank" th:href="@{'/storage/files/' + ${dataMap['ylzyxk'].path}}"
                                       class="layui-btn layui-btn-normal layui-btn-xs">查看</a><a
                                        th:href="@{'/storage/files/dl/' + ${dataMap['ylzyxk'].path}}"
                                        class="layui-btn layui-btn-normal  layui-btn-xs">下载</a><a
                                        th:href="@{/cert/delete(id=${dataMap['ylzyxk'].id})}"
                                        class="layui-btn layui-btn-normal  layui-btn-xs">删除</a>
                                </p>
                            </div>
                        </div>
                    </div>
            </div>
            <div class="layui-row" style="padding: 20px 0;">
                <div class="layui-col-md1 label2">
                    医疗合作协议
                </div>
                <div class="layui-col-md6">
                    <table class="layui-table" lay-even lay-skin="row" lay-size="sm" id="ylxy-table"
                           th:style="'display:' + ${dataMap['ylsf'] != null ? '': 'none'}">
                        <tr>
                            <th>协议名称</th>
                            <th>操作</th>
                        </tr>
                        <tr th:if="${dataMap['ylsf'] != null}" th:each="cert:${dataMap['ylsf']}">
                            <td th:text="${cert.name}"></td>
                            <td>
                                <!--<a target="_blank" th:href="@{'/storage/files/' + ${cert.path}}" class="layui-btn layui-btn-normal layui-btn-xs">查看</a>-->
                                <a th:href="@{'/storage/files/dl/' + ${cert.path}}"
                                   class="layui-btn layui-btn-normal  layui-btn-xs">下载</a>
                                <a th:href="@{/cert/delete(id=${cert.id})}"
                                   class="layui-btn layui-btn-normal  layui-btn-xs">删除</a></td>
                        </tr>
                    </table>
                    <button type="button" class="layui-btn layui-btn-sm" id="ylxy"><i class="layui-icon"></i>上传协议
                    </button>
                </div>
            </div>

            <blockquote class="layui-elem-quote">《食品经营许可证》点击图片框进行上传（小于5m的图片），机构若存在相关服务则需上传相关的许可证书，否则不需上传</blockquote>
            <div class="layui-row">
                <div class="layui-col-md1 label">
                    食品卫生<br/>许可证
                </div>
                <div class="layui-col-md2">
                    <div class="layui-upload">
                        <div class="layui-upload-list">
                            <img th:if="${dataMap['spxk'] eq null}" class="layui-upload-img"
                                 src="/static/imgs/imgup.png" id="img5">
                            <img th:if="${dataMap['spxk'] ne null}" class="layui-upload-img"
                                 th:src="'/storage/images/'+${dataMap['spxk'].path}+'_120x120'" id="img5">
                            <p class="msg-box" th:if="${dataMap['spxk'] eq null}"></p>
                            <p class="msg-box" th:if="${dataMap['spxk'] ne null}">
                                <a target="_blank" th:href="@{'/storage/files/' + ${dataMap['spxk'].path}}"
                                   class="layui-btn layui-btn-normal layui-btn-xs">查看</a><a
                                    th:href="@{'/storage/files/dl/' + ${dataMap['spxk'].path}}"
                                    class="layui-btn layui-btn-normal  layui-btn-xs">下载</a><a
                                    th:href="@{/cert/delete(id=${dataMap['spxk'].id})}"
                                    class="layui-btn layui-btn-normal  layui-btn-xs">删除</a>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row" style="padding: 20px 0;">
                <div class="layui-col-md1 label2">
                    餐饮合作协议
                </div>
                <div class="layui-col-md6">
                    <table class="layui-table" lay-even lay-skin="row" lay-size="sm" id="cyxy-table"
                           th:style="'display:' + ${dataMap['cysf'] != null ? '': 'none'}">
                        <tr>
                            <th>协议名称</th>
                            <th>操作</th>
                        </tr>
                        <tr th:if="${dataMap['cysf'] != null}" th:each="cert:${dataMap['cysf']}">
                            <td th:text="${cert.name}"></td>
                            <td>
                                <!--<a target="_blank" th:href="@{'/storage/files/' + ${cert.path}}" class="layui-btn layui-btn-normal layui-btn-xs">查看</a>-->
                                <a th:href="@{'/storage/files/dl/' + ${cert.path}}"
                                   class="layui-btn layui-btn-normal  layui-btn-xs">下载</a>
                                <a th:href="@{/cert/delete(id=${cert.id})}"
                                   class="layui-btn layui-btn-normal  layui-btn-xs">删除</a></td>
                        </tr>
                    </table>
                    <button type="button" class="layui-btn layui-btn-sm" id="cyxy"><i class="layui-icon"></i>上传协议
                    </button>
                </div>
            </div>
            <blockquote class="layui-elem-quote">《其它第三方合作协议》上传</blockquote>
            <div class="layui-row" style="padding: 20px 0;">
                <div class="layui-col-md1 label2">
                    其它第三方合作协议
                </div>
                <div class="layui-col-md6">
                    <table class="layui-table" lay-even lay-skin="row" lay-size="sm" id="fwxy-table"
                           th:style="'display:' + ${dataMap['fwxy'] != null ? '': 'none'}">
                        <tr>
                            <th>协议名称</th>
                            <th>操作</th>
                        </tr>
                        <tr th:if="${dataMap['fwxy'] != null}" th:each="cert:${dataMap['fwxy']}">
                            <td th:text="${cert.name}"></td>
                            <td>
                                <!--<a target="_blank" th:href="@{'/storage/files/' + ${cert.path}}" class="layui-btn layui-btn-normal layui-btn-xs">查看</a>-->
                                <a th:href="@{'/storage/files/dl/' + ${cert.path}}"
                                   class="layui-btn layui-btn-normal  layui-btn-xs">下载</a>
                                <a th:href="@{/cert/delete(id=${cert.id})}"
                                   class="layui-btn layui-btn-normal  layui-btn-xs">删除</a></td>
                        </tr>
                    </table>
                    <button type="button" class="layui-btn layui-btn-sm" id="fwxy"><i class="layui-icon"></i>上传协议
                    </button>
                </div>
            </div>
            <blockquote class="layui-elem-quote">《星级证书》点击图片框进行上传（小于5m的图片），机构若存在相关服务则需上传相关的许可证书，否则不需上传</blockquote>
            <div class="layui-row">
                <div class="layui-col-md1 label">
                    星级证书
                </div>
                <div class="layui-col-md2">
                    <div class="layui-upload">
                        <div class="layui-upload-list">
                            <img th:if="${dataMap['xjpd'] eq null}" class="layui-upload-img"
                                 src="/static/imgs/imgup.png" id="xjpd">
                            <img th:if="${dataMap['xjpd'] ne null}" class="layui-upload-img"
                                 th:src="'/storage/images/'+${dataMap['xjpd'].path}+'_120x120'" id="xjpd">
                            <p class="msg-box" th:if="${dataMap['xjpd'] eq null}"></p>
                            <p class="msg-box" th:if="${dataMap['xjpd'] ne null}">
                                <a target="_blank" th:href="@{'/storage/files/' + ${dataMap['xjpd'].path}}"
                                   class="layui-btn layui-btn-normal layui-btn-xs">查看</a><a
                                    th:href="@{'/storage/files/dl/' + ${dataMap['xjpd'].path}}"
                                    class="layui-btn layui-btn-normal  layui-btn-xs">下载</a><a
                                    th:href="@{/cert/delete(id=${dataMap['xjpd'].id})}"
                                    class="layui-btn layui-btn-normal  layui-btn-xs">删除</a>
                            </p>
                        </div>
                    </div>
                </div>
            </div>

            <blockquote class="layui-elem-quote">获得荣誉 点击按钮进行上传（小于5M的图片）,没有则不上传</blockquote>
            <div class="layui-row" style="padding: 20px 0;">
                <div class="layui-col-md1 label">
                    荣誉证书
                </div>
                <div class="layui-col-md10 qtxk-box">
                    <div th:if="${dataMap['ryzs'] != null}" th:each="cert:${dataMap['ryzs']}" class="layui-upload-list" style="margin:0 10px 5px;">
                        <img class="layui-upload-img" th:src="@{'/storage/images/' + ${cert.path} +'_120x120'}"/>
                        <p class="file-nme" th:title="${cert.name}" th:text="${cert.name}"></p>
                        <p class="msg-box">
                            <a target="_blank" th:href="@{'/storage/files/' + ${cert.path}}" class="layui-btn layui-btn-normal layui-btn-xs">查看</a>
                            <a  th:href="@{'/storage/files/dl/' + ${cert.path}}" class="layui-btn layui-btn-normal  layui-btn-xs">下载</a>
                            <a  th:href="@{/cert/delete(id=${cert.id})}" class="layui-btn layui-btn-normal  layui-btn-xs">删除</a>
                        </p>
                    </div>
                    <img class="layui-upload-img" src="/static/imgs/imgup.png" id="ryzs">
                </div>
            </div>

        </form>
    </div>
</div>
</html>